<?php

// echo the products images
function products_image() {

	global $post;
	
	$soot_seekers_details = get_post_meta( $post->ID, PRODUCTS_META_KEY, true );
	
	if( $soot_seekers_details == false ) {
	
		return;		// this return is not needed, but there to keep the function from being empty
		
	} else {
	
		echo '<div class="products-wrapper"><div class="products-image-wrapper"><img class="products-pic" src="'.$soot_seekers_details['image'].'" /></div><br class="clear" /></div>';
		
	}

}

// echo the descriptions for the products
function products_description() {

	global $post;
	
	$soot_seekers_details = get_post_meta( $post->ID, PRODUCTS_META_KEY, true );
	
	if( $products_info_details == false ) {
	
		return;		// this return is not needed, but there to keep the function from being empty
		
	} else {
	
		echo '<div class="products-wrapper"><div class="products-description">'.$soot_seekers_details['description'].'</div><br class="clear" /></div>';
		
	}

}

// echo the prices of the products
function products_price() {

	global $post;
	
	$soot_seekers_details = get_post_meta( $post->ID, PRODUCTS_META_KEY, true );
	
	if( $products_info_details == false ) {
	
		return;		// this return is not needed, but there to keep the function from being empty
		
	} else {
	
		echo '<div class="products-wrapper"><div class="products-price">$'.$soot_seekers_details['price'].'</div><br class="clear" /></div>';
		
	}

}

// echo the URLs of the products
function products_url() {

	global $post;
	
	$soot_seekers_details = get_post_meta( $post->ID, PRODUCTS_META_KEY, true );
	
	if( $products_info_details == false ) {
	
		return;		// this return is not needed, but there to keep the function from being empty
		
	} else {
	
		echo '<div class="products-wrapper"><div class="products-url">'.$soot_seekers_details['url'].'</div><br class="clear" /></div>';
		
	}

}

// echo all of the info for the products
function products_full() {

	global $post;
	
	$soot_seekers_details = get_post_meta( $post->ID, PRODUCTS_META_KEY, true );
	
	if( $soot_seekers_details == false ) {
	
		return;		// this return is not needed, but there to keep the function from being empty
		
	} else {
	
		echo '<div class="products-wrapper"><div class="products-image-column"><div class="products-image-wrapper"><div class="products-image">'.get_the_post_thumbnail($post->ID, "thumbnail").'</div></div></div><div class="products-text"><div class="products-name">'.get_the_title().'</div><div class="products-description">'.wpautop( $soot_seekers_details['description'] ).'</div><div class="products-price">$'.$soot_seekers_details['price'].'</div>';

if( $soot_seekers_details["url"] === "http://" ){ echo '</div><br class="clear" /></div>'; }
else{ 
    echo '<div class="products-url"><a class="products-url-a" href="';
    $soot_seekers_details["url"];
    echo '">'.$soot_seekers_details['url'].'</a></div></div><br class="clear" /></div>'; };
                

	}

}

?>